<?php
namespace app\serverfund\model;

use \app\manage\model\BaseModel;

/**
 * @author:      李颖
 * @DateTime:    2017-06-29 15:28:22
 * @Description: 数字币操作日志
 */
class CurrencyOptionLog extends BaseModel
{
    protected $name = 'currency_option_log';
    protected $connection = 'db_config_fund';
    protected $dateFormat = 'Y-m-d H:i:s';
    protected $append = ['status_text','type_text'];
    protected $typeText = ['init'=>'初始化', 'prepaid'=>'系统充值', 'deduct'=>'扣除', 'freeze'=>'冻结', 'unfreeze'=>'解冻', 'split'=>'拆分','lock'=>'锁定','get'=>'获取','system'=>'系统'];

    public function getTypeTextAttr($value, $data)
    {
        return $this->typeText[$data['type']];
    }
   
    public function getOtherInfoAttr($value)
    {
        return json_decode($value, true);
    }

    public function getUserInfoAttr($value)
    {
        return json_decode($value, true);
    }
   
    public function getOppositeInfoAttr($value)
    {
        return json_decode($value, true);
    }
}
